const ShowMenu = {
	namespaced: true,
	state: () => ({
		ShowMenu: [],
		SideMenu:[],
	}),
	getters: {
		filterChildrenRouter: state => {
			return state.ShowMenu.filter(item => {
				return !item.hidden
			})
		}
	},
	mutations: {
		setShowMenu(state,value){
			state.ShowMenu = value
		},
		setSideMenu(state, SideMenu) {
			if (SideMenu.children instanceof Array && SideMenu.children.length) {
				state.SideMenu = SideMenu.children
			} else {
				state.SideMenu = []
			}

		}
	}
}

export default ShowMenu
